home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_309 / sksh / addendum1.3.doc < prev    next >
Text File  |  1992-05-06  |  22KB  |  661 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                               Addendum for Version 1.3
  17.  
  18.                                         SKsh
  19.  
  20.                            A ksh-like Shell for the Amiga
  21.  
  22.                                      Version 1.3
  23.  
  24.  
  25.                                (Copyright) 1989, 1990
  26.  
  27.                                      Steve Koren
  28.  
  29.                                    January 2, 1990
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.           Addendum to Version 1.3
  74.  
  75.             This document describes additions and  changes  to  SKsh  since
  76.             version 1.2.
  77.  
  78.  
  79.             Hidden Bit Support
  80.  
  81.                The 'ls' command now omits files from the directory  listing
  82.                if they have the  'hidden'  (h)  bit  set.   To  see  hidden
  83.                files, use the 'h' option to the ls command.
  84.  
  85.  
  86.             cd bug fixed
  87.  
  88.                SKsh will now report an error if the destination of  a  'cd'
  89.                command is a file.
  90.  
  91.  
  92.             touch bug fixed
  93.  
  94.                Touching an empty directory will no longer convert it  to  a
  95.                file.
  96.  
  97.  
  98.             extname command added
  99.  
  100.                An  'extname'  command  was  added  which  complements   the
  101.                'dirname' and 'basename' commands.   It  will  print  either
  102.                the extension of a filename, or  the  portion  of  the  file
  103.                name  which  is  not  the  extension  (when  given  the  'v'
  104.                option).  For example, 'extname foo.bar' would print  'bar',
  105.                while 'extname -v foo.bar' would print  'foo'.   extname can
  106.                also print the part of  the  file  name  which  is  not  the
  107.                extension, if given the -v option.
  108.  
  109.  
  110.             Spaces now passed correctly to external commands
  111.  
  112.                SKsh now passes arguments with spaces correctly to  external
  113.                commands (by  surrounding  them  with  double  quotes).   It
  114.                should have been doing this all along.
  115.  
  116.  
  117.             window command added
  118.  
  119.                An external command has been added  which  can  be  used  to
  120.                move the  window,  resize  the  window,  change  the  window
  121.                title, move the window to the  back  or  front,  report  the
  122.                current window position, report  the  current  window  size,
  123.                report the current window title, report the screen size,  or
  124.                report the mouse position relative to the window or  screen.
  125.                See the documentation on the 'window' command for details.
  126.  
  127.  
  128.  
  129.           SKSH Amiga Shell             Page 2              Addendum to 1.3
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.             Overstrike mode for command line editing
  141.  
  142.                There is now an overstrike mode for  command  line  editing.
  143.                The mode can be toggled between  insert  and  overstrike  by
  144.                using the '^z' key.  Also, two  new  options  flags  support
  145.                overstrike mode.  If the  'O'  options  is  set,  overstrike
  146.                becomes the default instead of insert.  If the '1'  flag  is
  147.                set, the mode is changed back to the  current  default  upon
  148.                return; otherwise it remains as is.
  149.  
  150.                There is currently a small bug  with  overstrike  mode  that
  151.                causes it to print a character  in  the  wrong  position  if
  152.                characters are typed when the left most section  of  a  long
  153.                line is displayed and the cursor is at  the  right  edge  of
  154.                the window.  If this occurs, you can  use  '^l'  to  correct
  155.                the situation.  I didn't think this was  serious  enough  to
  156.                warrant spending a lot of time hunting it down, since it  is
  157.                a corner case.  I will probably fix it later.
  158.  
  159.  
  160.             New command line editing functions
  161.  
  162.                The '^g' key has  now  been  mapped  to  abort  the  current
  163.                command  line.   This  is  easier  to  type  than  the   two
  164.                character dipthong '^a^k'.
  165.  
  166.                The sequence esc-/ has been mapped to insert the  'tail'  of
  167.                the previous command line; that  is,  all  of  the  previous
  168.                line except the first word.  It is similar in  operation  to
  169.                the esc-. command.
  170.  
  171.                Both esc-. and esc-/ now insert a space  if  there  was  not
  172.                one there already, and  if  they  are  not  invoked  at  the
  173.                beginning of the line.
  174.  
  175.  
  176.             which -s bug fixed
  177.  
  178.                A minor bug with the 'which -s' command was  causing  it  to
  179.                print a newline instead of exitting silently if the  command
  180.                was not found.  This has been fixed.
  181.  
  182.  
  183.             info command extended
  184.  
  185.                The 'info' command now reports the number of free  kilobytes
  186.                on the device as well as the number of used kilobytes.
  187.  
  188.  
  189.             touch, cp -c now reset archive bit
  190.  
  191.                The 'touch' and 'cp -c'  commands  now  reset  the  AmigaDos
  192.                archive bit.
  193.  
  194.  
  195.           SKSH Amiga Shell             Page 3              Addendum to 1.3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.             Error report bug fixed
  207.  
  208.                There was a bug in  the  previous  error  reporting  routine
  209.                which caused  a  buffer  overflow  error  if  a  long  error
  210.                message was encountered (such as would be  the  case  for  a
  211.                very long file name which was not  found).   This  has  been
  212.                fixed.  Error messages can now be much longer, and they  are
  213.                truncated to a manageable length.
  214.  
  215.  
  216.             -a (all) option added to info
  217.  
  218.                A '-a' flag was added to  the  info  command  which  reports
  219.                information   on   all   filesystem   volumes.     Unmounted
  220.                filesystems are silently skipped.
  221.  
  222.  
  223.             -b (builtin) option added to unset
  224.  
  225.                It is now possible to unset  builtin  commands  as  well  as
  226.                aliases, functions, and variables.   This  makes  it  easier
  227.                for people who wish to use an external  command  instead  of
  228.                the SKsh builtin version.  The memory taken by the  code  is
  229.                not actually freed, but after a builtin is unset, it  is  no
  230.                longer possible to use  that  builtin  short  of  restarting
  231.                SKsh.  Note that this is a dangerous thing to  do;  you  can
  232.                inadvertently unset a builtin  such  as  'shift'  or  'exit'
  233.                which is need for proper operation of the shell.   In  fact,
  234.                you can even unset the 'unset' builtin  itself,  although  I
  235.                wouldn't recommend doing this.  Only  use  this  command  if
  236.                you are sure you know what you are doing.
  237.  
  238.                The other unset commands have aliases such as  'unalias'  to
  239.                make them easier to type and remember; this one  comes  with
  240.                no such alias.
  241.  
  242.                A future version of  SKsh  ("tiny-SKsh")  will  be  provided
  243.                which only contains a few of  the  necessary  builtins,  and
  244.                eliminates the rest to save space.
  245.  
  246.  
  247.             join command added
  248.  
  249.                A new "join" command has been added which allows textual  or
  250.                binary data to be  concatenated  and  the  results  sent  to
  251.                another file.  See the documentation  on  that  command  for
  252.                details.
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.           SKSH Amiga Shell             Page 4              Addendum to 1.3
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.             Unmounted volumes in path no longer searched
  272.  
  273.                If your SKsh  path  includes  unmounted  volumes,  the  disk
  274.                requester will no longer appear.  The unmounted volumes  are
  275.                ignored.  This allows you to, for example, include df0:c  in
  276.                your path without having a disk in df0:.  In  addition,  the
  277.                cd command no longer causes the disk requester to appear  if
  278.                the destination directory is on an unmounted  volume.   This
  279.                behavior  is  changeable  with  the  'U'  option,  which  is
  280.                described below.
  281.  
  282.  
  283.             chmod with - option no longer sets rewd bits
  284.  
  285.                In SKsh 1.2, a chmod command which reset  any  of  the  high
  286.                four bits also set the low four bits, even if they were  not
  287.                set to begin with.  This has been fixed.
  288.  
  289.  
  290.             wc bug on large files fixed
  291.  
  292.                There was a bug in version  5.02  of  the  Lattice  compiler
  293.                which  caused  wc to  report  improper  character  and  word
  294.                counts  for  very  large  files.     wc is now compiled with
  295.                version 5.04 of the compiler, and this bug is fixed.
  296.  
  297.  
  298.             wc no longer truncates file names
  299.  
  300.                If  wc is passed file names longer than 16 characters,  they
  301.                will no longer be truncated.
  302.  
  303.  
  304.             cat now reads standard input properly
  305.  
  306.                The  cat  command  now  properly  reads  standard  input  if
  307.                redirected from a file or a pipeline.
  308.  
  309.  
  310.             External commands now optimized
  311.  
  312.                The external commands  are  now  optimized,  reducing  their
  313.                size slightly and, at least in theory, making them faster.
  314.  
  315.  
  316.             History list length limit removed
  317.  
  318.                In versions 1.2 and earlier, there was  an  arbitrary  limit
  319.                of 256 lines in the history list at one  time.   Since  this
  320.                limit was completely arbitrary,  it  has  been  extended  to
  321.                32000 lines.  The list length is controlled by the  HISTSIZE
  322.                variable;  memory  usage  can  be  reduced  by  making  this
  323.                variable a small number.
  324.  
  325.  
  326.  
  327.           SKSH Amiga Shell             Page 5              Addendum to 1.3
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.             History searches now can examine only line prefix
  338.  
  339.                History searches previously would match text  occurring  any
  340.                place within a line.  Some  people  prefer  a  search  which
  341.                matches only a line  prefix;  this  has  been  added  as  an
  342.                option.   The  default  is  the  original  method;  however,
  343.                setting the 'P' option forces history searches  to  match  a
  344.                line prefix.
  345.  
  346.  
  347.             'x' added as an synonym for 'e' in chmod command
  348.  
  349.                An 'x' can now be used as a synonym for  'e'  in  the  chmod
  350.                command, making this command  operate  more  like  its  Un*x
  351.                equivalent.
  352.  
  353.  
  354.             getenv bug fixed
  355.  
  356.                SKsh has been  recompiled  with  a  latter  version  of  the
  357.                Lattice compiler  which  fixes  the  getenv problem.  getenv
  358.                now works properly, and it is no  longer  necessary  to  use
  359.                the AmigaDos getenv call.
  360.  
  361.  
  362.             Case insensitive file name expansion, wildcards, etc.
  363.  
  364.                There is now an  option  to  make  command  line  file  name
  365.                expansion, wildcard card file expansion,  and  a  few  other
  366.                things case insensitive.  If the 'c' option to SKsh is  set,
  367.                all wildcard expansions  will  be  case  insensitive.   This
  368.                applies also to commands  such  as  'aliases',  'functions',
  369.                'set', and 'match'.  Anything  that  previously  accepted  a
  370.                wildcard pattern will now be case  insensitive  if  the  'c'
  371.                flag is set.  This flag is set for you in the new  .skshinit
  372.                file, which should be installed in place of the old one.
  373.  
  374.  
  375.             Wildcard pattern matching changed
  376.  
  377.                The wildcard expansion routines have been  changed  slightly
  378.                to better conform to the Un*x behavior.  If a  pattern  does
  379.                not match any files, the pattern itself  is  returned.   For
  380.                example, 'echo blah*' does  in  fact  echo  'blah*'  if  the
  381.                pattern matches no files.  This  will  cause  most  commands
  382.                which deal with files to return an error message.
  383.  
  384.  
  385.             ls now reports an error upon file not found
  386.  
  387.                The  ls command now reports an error message if any  of  the
  388.                files specified on the command line are not found.
  389.  
  390.  
  391.  
  392.  
  393.           SKSH Amiga Shell             Page 6              Addendum to 1.3
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.             tail error reporting bug fixed
  404.  
  405.                A minor bug in  the  tail command has been fixed.  The error
  406.                message printed if a file couldn't be found  was  missing  a
  407.                trailing newline; this has been added.
  408.  
  409.  
  410.             mkdir bug fixed
  411.  
  412.                mkdir no longer changes files to  directories  if  the  file
  413.                existed previously.  This was actually a bug in the  Lattice
  414.                mkdir() function, which was not reporting an error  code  if
  415.                a file with the same name as the new directory existed.
  416.  
  417.  
  418.             '*' in filename bug fixed
  419.  
  420.                A file with a '*' or '?' in  the  filename  will  no  longer
  421.                crash the shell if it is listed explicitly or  matched  with
  422.                a  pattern.   Previously,  the  pattern  matching  code  was
  423.                calling itself recursively and infinitely in this case.   It
  424.                no longer does this.
  425.  
  426.  
  427.             expr bug fixed
  428.  
  429.                'expr 1 / 0' no longer crashes SKsh.  It now gives a  result
  430.                of zero.
  431.  
  432.  
  433.             -m added to test expressions
  434.  
  435.                A -m switch was added to test  expressions  which  allows  a
  436.                device to be tested to see whether  it  contains  a  mounted
  437.                disk.  For example, 'c:' will be "mounted" if it  points  to
  438.                a real location on a  physical  disk,  and  "df1:"  will  be
  439.                mounted if it contains a floppy disk.  The  -m  switch  will
  440.                return true if given a null argument ("").  Also, it can  be
  441.                passed a device and  path  name,  in  which  case  the  path
  442.                portion will be ignored.  This feature is  often  convenient
  443.                in scripts.
  444.  
  445.  
  446.             -ot, -nt added to test expressions
  447.  
  448.                Two new tests were added which  determine  whether  a  given
  449.                file is older than or newer than another.  If the files  are
  450.                the same age (perhaps  because  they  are  the  same  file),
  451.                false is returned for either test.
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.           SKSH Amiga Shell             Page 7              Addendum to 1.3
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.             U option added
  470.  
  471.                A new 'U' option was added  which,  if  set,  will  cause  a
  472.                requester to appear when SKsh sees an  unmounted  volume  in
  473.                the path.  This flag is normally reset.
  474.  
  475.  
  476.             Infinite recursion no longer prints *** break
  477.  
  478.                Previously, if SKsh caught what it believed to  be  infinite
  479.                recursion in a  function  or  alias,  it  would  print  "***
  480.                break" to the console.  This no longer  happens;  the  break
  481.                message is printed  only  if  ^c  is  used  to  interrupt  a
  482.                pending operation.
  483.  
  484.  
  485.             Function key bug fixed
  486.  
  487.                With the 'h' option set, lines that  are  entered  with  the
  488.                function keys can now be edited.
  489.  
  490.  
  491.             chmod now continues after error
  492.  
  493.                If chmod is unable to change the permissions on a  file,  it
  494.                now continues and attempts to process the rest of the  files
  495.                in the argument  list.   It  previously  stopped  after  the
  496.                first error was encountered.
  497.  
  498.  
  499.             File name completion extended
  500.  
  501.                In addition to being optionally  non  case  sensitive,  file
  502.                name completion now works in the middle  of  a  line.   That
  503.                is, the cursor no longer has to  be  at  the  end  of  line.
  504.                This feature works with <tab> (esc-esc), <esc>*, and  <esc>=
  505.                style completion mechanisms.  The new text will be  inserted
  506.                into the proper place in the command line.
  507.  
  508.  
  509.             rm -r bug fixed
  510.  
  511.                In SKsh 1.2, an rm -r on a nonexistant  file  rather  rudely
  512.                crashed the system.  This no longer happens, and a  sensible
  513.                error message is printed instead.
  514.  
  515.  
  516.             return bug fixed
  517.  
  518.                The  return statement now  operates  correctly  in  scripts.
  519.                Previously, it only worked in functions, but had  no  effect
  520.                when used in a script.
  521.  
  522.  
  523.  
  524.  
  525.           SKSH Amiga Shell             Page 8              Addendum to 1.3
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.             Documentation updates
  536.  
  537.                As always, I have tried to keep the  UserMan  and  Reference
  538.                documents  up  to  date  with  the   lattest   changes   and
  539.                additions.  Also, a  new  ErrorCodes.doc  file  is  included
  540.                which lists each SKsh error code.
  541.  
  542.  
  543.             New Files
  544.  
  545.                A new file, called "Stuff.sksh"  has  been  included.   This
  546.                file contains some useful functions and aliases.  It is  not
  547.                by default loaded by SKsh; it is intended to be a source  of
  548.                functions which can be cut out and  placed  into  a  .skshrc
  549.                file.  Alternatively, if all the functions  and  aliases  of
  550.                the Stuff.sksh file are desired, it can  be  copied  to  the
  551.                sksh: directory and sourced from the .skshrc file  with  the
  552.                following line:
  553.  
  554.                   . sksh:Stuff.sksh
  555.  
  556.                The Stuff.sksh file currently contains a "man" function  for
  557.                accessing online manual pages, a  "qrm"  function  to  query
  558.                before  deleting  files,  "pushd",  "popd",   and   "cleard"
  559.                commands to implement a directory stack,  and  a  few  other
  560.                things as well.  The file may grow  in  future  versions  of
  561.                Sksh.  Comments in the file explain the  operation  of  each
  562.                command.
  563.  
  564.  
  565.           Notes
  566.  
  567.             There are a few things that may appear to be SKsh bugs, but  in
  568.             reality are AmigaDos problems:
  569.  
  570.             *  Append redirection does not  work  with  external  binaries.
  571.                This is NOT  an  SKsh  bug;  the  Amiga  uses  two  distinct
  572.                methods of file I/O which do not coexist  well.   SKsh  uses
  573.                one method which is standard among compilers  and  operating
  574.                systems; however certain things on the Amiga  must  be  done
  575.                with the other method, and problems arise as a  result.   It
  576.                would be *possible* to fix this problem in SKsh,  but  as  a
  577.                matter of principle I won't do  it.   It  is  really  a  DOS
  578.                architecture problem, and shouldn't  need  to  be  fixed  in
  579.                application programs.
  580.  
  581.             *  The SKsh file I/O is slower than it  should  be.   This  is,
  582.                again, caused by the two  disjoint  file  I/O  methods;  the
  583.                standard mechanisms are much slower than the  other  method.
  584.                This could also be fixed in SKsh, but again as a  matter  of
  585.                principle I won't.
  586.  
  587.  
  588.  
  589.  
  590.  
  591.           SKSH Amiga Shell             Page 9              Addendum to 1.3
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.             *  Resetting the 'w' bit on a file, and then  "cat"ing  another
  602.                file to that one will overwrite the first file, even  though
  603.                the 'w' bit  is  not  set.   This  is,  again,  an  AmigaDos
  604.                problem; the fopen() call  succeeds  when  it  should  fail.
  605.                Applications should not have to  check  this  flag  on  each
  606.                fopen.  Hopefully this will be fixed in a future version  of
  607.                AmigaDos.  There are similar problems with the 'r' flag.
  608.  
  609.  
  610.           That said, I should point  out  that  even  though  AmigaDos  has
  611.           certain bugs and architectural problems, it  is  nonetheless  one
  612.           of the best PC operating systems; it provides many features  such
  613.           as shared libraries, multitasking,  and  multiple  screens  which
  614.           other micro operating systems do  not  yet  have.   Commodore  is
  615.           also steadily improving the  OS,  fixing  bugs,  and  adding  new
  616.           features.
  617.  
  618.           There are a few other things to note:
  619.  
  620.             *  SKsh needs the latest  version  of  ARP  installed.   If  an
  621.                early ARP is used, there could be problems invoking  certain
  622.                programs.  If you have these problems,  check  your  version
  623.                of ARP and obtain a more recent one if necessary.
  624.  
  625.             * Since SKsh uses its own notion of a  PATH,  certain  programs
  626.                may still look at the AmigaDos path, and hence require  that
  627.                to be set.  This is OK; the two  path  mechanisms  will  not
  628.                interfere with each other.
  629.  
  630.  
  631.           As a final  note,  I  would  like  to  thank  everyone  who  made
  632.           suggestions and reported bugs.  These people  are  too  numerious
  633.           to mention individually,  but  nonetheless  have  contributed  to
  634.           SKsh in an important way.  Many of the improvements in  SKsh  1.3
  635.           came directly from user suggestions.
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.           SKSH Amiga Shell            Page 10              Addendum to 1.3
  658.  
  659.  
  660.  
  661.